/**
 * @Author: ls <ls-mac>
 * @Date:   2020-05-14 15:19:47
 * @Last modified by:   ls-mac
 * @Last modified time: 2020-05-20 15:03:02
 */
$(function () {
  var warehouse = {
    init: function init() {
      this.bindRange();
      this.bindTable();
    },
    bindRange: function bindRange() {
      $(".k-daterangepicker").kendoDateRangePicker({
        labels: false,
        placeholder: [{
          start: "开始时间"
        }]
      }).data("kendoDatePicker");
    },
    bindTable: function bindTable() {
      $("#warehouseGrid").kendoGrid({
        dataSource: {
          type: "odata",
          transport: {
            read: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Customers"
          },
          pageSize: 20
        },
        height: 550,
        groupable: true,
        sortable: true,
        pageable: {
          refresh: true,
          pageSizes: true,
          buttonCount: 5
        },
        columns: [{
          field: "ContactTitle",
          title: "预结算单号"
        }, {
          field: "CompanyName",
          title: "运帮结算单号"
        }, {
          field: "CompanyName",
          title: "结算日期"
        }, {
          field: "CompanyName",
          title: "结算客户"
        }, {
          field: "CompanyName",
          title: "总重量"
        }]
      });
    }
  };
  warehouse.init();
});
